home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog2 / DLL / MakeDLL < prev    next >
Encoding:
Text File  |  1995-07-09  |  3.3 KB  |  140 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Create    \
  4.             o.Delete    \
  5.             o.EnsureWind    \
  6.             o.OpenClose    \
  7.             o.OpenLeaf    \
  8.             o.OpenMenu    \
  9.             o.OpenPos    \
  10.             o.OpenStatic    \
  11.  
  12.  
  13. LibName        =    Dialog2
  14.  
  15.  
  16.  
  17. # Template makefile to make Straylight Dynamic Link 
  18. # Library from a DeskLib sublibrary's .o files
  19. #
  20. # The DLL is made in the directory 
  21. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  22. # and has the same name as the DeskLib sublibrary.
  23. #
  24. # Julian Smith 17 Apr 1995.
  25.  
  26. # The macro $(ObjectFiles) should be set at the 
  27. # start of this file, to be a space-separated
  28. # list of object files.
  29. # This is done by 'Makatic'.
  30.  
  31. # The macro $(LibName) should also be set at the 
  32. # start of this file, to be the name of the 
  33. # DeskLib sublibrary.
  34. # This is done by 'Makatic'.
  35.  
  36. # Note that this makefile doesn't use cc at all
  37. # - it merely links existing .o files.
  38.  
  39. # Linker flags, These can be anything. 
  40. # All flags required by Straylight (eg Link -rmf) 
  41. # are included in the $(LINK) macro.
  42. #
  43. LinkFlags    =    $(LinkExtra)
  44.  
  45.  
  46. # Macros for commands, including the Straylight
  47. # tool 'cdll'. Note that DRLink doesn't seem to
  48. # work with the SDLS.
  49. #
  50. LINK        =    Link -rmf
  51. CDLL        =    cdll
  52.  
  53.  
  54. # Filename of the thing we need to make: - the main
  55. # dynamically-linked library, which will go in the 
  56. # !DLL application.
  57. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  58. # application) should be the same as the 'name' field in the
  59. # $(DLL_Def) file. In this case, this is $(LibName).
  60. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  61.  
  62.  
  63. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  64. #
  65. DLL_Header    =    Header
  66. DLL_Def        =    ^.DLLDef
  67. DLL_Stubs    =    Stubs
  68.  
  69.  
  70.  
  71. # -------------------------------------------------------
  72. # Everything below here should probably not be changed...
  73. # -------------------------------------------------------
  74.  
  75.  
  76. # Extra libs, written by Straylight, which always need to be linked into a DLL
  77. #
  78. SDLS_ExtraObjects=                    \
  79.             C:DLLLib.o.DLLLib        \
  80.             C:DLLLib.o.dstubs        \
  81.  
  82.  
  83. # Extra DeskLib libraries which need to be linked into the final DLL.
  84. # The DLL DeskLib library is included here because some DeskLib DLLs may
  85. # refer to other DeskLib DLLs.
  86. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  87. # the sublibraries for which there is a DLL - just the DLL Stubs file
  88. # is included for these.
  89. #
  90. DeskLib_ExtraObjects=                \
  91.             DeskLib:o.DLLDLL    \
  92.  
  93.  
  94.  
  95.  
  96. #Here's what we want to make...
  97.  
  98. All:    $(DLL_Lib)
  99.  
  100. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  101.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  102.  
  103.  
  104.  
  105. # Here's how to make the things which are needed in the above rules
  106.  
  107. $(DLL_Def):    
  108.     | Error: No DLL definition file exists.
  109.     |        You should run th MkStubsOs makefile
  110.     |        and then alter the template Def
  111.     |        file by hand.
  112.  
  113. $(DLL_Header):    $(DLL_Def)
  114.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  115.  
  116.  
  117. # Rule for compiling C source code for a Straylight dynamically-linked library.
  118. # Actually, we don't call cc - we complain and tell the user to run the 
  119. # MkStubsOs makefile.
  120.  
  121. VPATH = @.^
  122.  
  123. .SUFFIXES:    .o .c .s
  124. .c.o:
  125.     | $@ needs recompiling. This should be done by
  126.     | running the MkStubsOs or MkOs makefile before running
  127.     | this makefile.
  128.     |
  129.  
  130. .s.o:
  131.     | $@ needs assembling. This should be done by
  132.     | running the MkStubsOs or MkOs makefile before running
  133.     | this makefile.
  134.     |
  135.  
  136.  
  137.  
  138. # Dynamic dependencies:
  139.